package com.xicode.media.serve.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author LGC
 */
@Controller
public class LiveController {

    @GetMapping("/toPlay")
    public String toPlay(String url, Model model) {
        String videoPath = "ws://localhost:9998/live?url=" + url;
        model.addAttribute("videoPath", videoPath);
        model.addAttribute("width", 800);
        model.addAttribute("height", 400);
        return "video";
    }
}
